import { pubRequire } from '@utils/public'
const baseUrl = '/works/videos'
//作品维护列表
export function getPreserveList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callbBack, errBack)
}
//我的发布列表
export function getMineList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/me`, obj, callbBack, errBack)
}
//我的发布-发布作品
export function pubWork(obj, callbBack, errBack) {
  return pubRequire('post', `${baseUrl}/me`, obj, callbBack, errBack)
}
//观看
export function watch(id, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/watch`, '', callbBack, errBack)
}
//取消观看
export function cancelWatch(id, callbBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/cancel-watch`,
    '',
    callbBack,
    errBack
  )
}
